
#pragma once

#include <WinDef.h>

#include "Core\Bindable.h"

struct ID3D11Buffer;

class VertexBuffer : public Bindable
{
public:
	VertexBuffer(LPCVOID data, UINT size, UINT count);
	~VertexBuffer();

	// Management.
	//-----------------------------------------------
	BOOL IsBinded() CONST;

	BOOL Bind();
	VOID Unbind();
	
	VOID Enable();
	
	// Getters & Setters.
	//-----------------------------------------------
	UINT Size() CONST;

protected:
	VertexBuffer(CONST VertexBuffer&);
	VertexBuffer& operator = (CONST VertexBuffer&);

private:
	// Attributes.
	//-----------------------------------------------
	// Data
	LPVOID				 m_data;
	UINT				 m_size;
	UINT				 m_count;

	// Buffers
	ID3D11Buffer* 	     m_buffer;

	// Flags
	BOOL				 m_binded;
};

